Skip to main content
Version: Upcoming

SpreadBookQuote

V8 Message Definiton

This table contains live spread quote records from the individual equity option exchanges. Each record contains up to two price levels and represents a live snapshot of the book for a specific spread.

METADATA

AttributeValue
Topic2895-market-data-spreads
MLink TokenSpreadMktData
ProductSRSpread
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
skey_atenum - AssetTypePRI'None'SR Spread Key should have corresponding ProductDefinition record
skey_tsenum - TickerSrcPRI'None'SR Spread Key should have corresponding ProductDefinition record
skey_tkVARCHAR(12)PRI''SR Spread Key should have corresponding ProductDefinition record
isTestenum - YesNoPRI'None'Yes indicates that response is made of entirely of isTestYes SpreadExchOrders
ticker_atenum - AssetType'None'common spread underlier
ticker_tsenum - TickerSrc'None'common spread underlier
ticker_tkVARCHAR(12)''common spread underlier
SRspreadIDBIGINT0
bidPrice1DOUBLE0bid price
isBidPrice1Validenum - YesNo'None'
askPrice1DOUBLE0ask price
isAskPrice1Validenum - YesNo'None'
bidSize1INT0cumulative size at bidPrice
askSize1INT0cumulative size at askPrice
bidPrice2DOUBLE02nd best bid price
isBidPrice2Validenum - YesNo'None'
askPrice2DOUBLE02nd best ask price
isAskPrice2Validenum - YesNo'None'
bidSize2INT0cumulative size at 2nd price
askSize2INT0cumulative size at 2nd price
bidExch1enum - OptExch'None'exchange at bid price with the largest size if any
askExch1enum - OptExch'None'exchange at ask price with the largest size if any
bidMask1INT UNSIGNED0exchange bid bit mask OptExch mask for NMS spreads zero for single exchange spreads
askMask1INT UNSIGNED0exchange ask bit mask OptExch mask for NMS spreads zero for single exchange spreads
bidTimeDATETIME(6)'1900-01-01 00:00:00.000000'last bid price or size change
askTimeDATETIME(6)'1900-01-01 00:00:00.000000'last ask price or size change
printVolumeINT0
updateTypeenum - UpdateType'None'
srcTimestampBIGINT0source high precision timestamp if available
netTimestampBIGINT0inbound packet PTP timestamp from SR gateway switchusually syncronized with facility grandfather clock
timestampDATETIME(6)'1900-01-01 00:00:00.000000'

PRIMARY KEY DEFINITION (Unique)

FieldSequence
skey_tk1
skey_at2
skey_ts3
isTest4

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRSpread`.`MsgSpreadBookQuote` (
`skey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'SR Spread Key (should have corresponding ProductDefinition record)',
`skey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'SR Spread Key (should have corresponding ProductDefinition record)',
`skey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'SR Spread Key (should have corresponding ProductDefinition record)',
`isTest` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'Yes indicates that response is made of entirely of isTest=Yes SpreadExchOrders',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'common spread underlier',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'common spread underlier',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'common spread underlier',
`SRspreadID` BIGINT NOT NULL DEFAULT 0,
`bidPrice1` DOUBLE NOT NULL DEFAULT 0 COMMENT 'bid price',
`isBidPrice1Valid` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`askPrice1` DOUBLE NOT NULL DEFAULT 0 COMMENT 'ask price',
`isAskPrice1Valid` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`bidSize1` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size at bidPrice',
`askSize1` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size at askPrice',
`bidPrice2` DOUBLE NOT NULL DEFAULT 0 COMMENT '2nd best bid price',
`isBidPrice2Valid` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`askPrice2` DOUBLE NOT NULL DEFAULT 0 COMMENT '2nd best ask price',
`isAskPrice2Valid` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`bidSize2` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size at 2nd price',
`askSize2` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size at 2nd price',
`bidExch1` ENUM('None','AMEX','BOX','CBOE','ISE','NYSE','PHLX','NSDQ','BATS','C2','NQBX','MIAX','GMNI','CME','CBOT','NYMEX','COMEX','ICE','EDGO','MCRY','MPRL','SDRK','DQTE','EMLD','CFE','MEMX','SPHR','EUREX','CEDX','NXAM','NXBR','NXLS','NXML','NXOS','NXP','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'exchange at bid price with the largest size (if any)',
`askExch1` ENUM('None','AMEX','BOX','CBOE','ISE','NYSE','PHLX','NSDQ','BATS','C2','NQBX','MIAX','GMNI','CME','CBOT','NYMEX','COMEX','ICE','EDGO','MCRY','MPRL','SDRK','DQTE','EMLD','CFE','MEMX','SPHR','EUREX','CEDX','NXAM','NXBR','NXLS','NXML','NXOS','NXP','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'exchange at ask price with the largest size (if any)',
`bidMask1` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'exchange bid bit mask (OptExch mask for NMS spreads; zero for single exchange spreads)',
`askMask1` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'exchange ask bit mask (OptExch mask for NMS spreads; zero for single exchange spreads)',
`bidTime` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'last bid price or size change',
`askTime` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'last ask price or size change',
`printVolume` INT NOT NULL DEFAULT 0,
`updateType` ENUM('None','PrcChange','SizeOnly','PrevPeriod') NOT NULL DEFAULT 'None',
`srcTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'source high precision timestamp (if available)',
`netTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'inbound packet PTP timestamp from SR gateway switch;usually syncronized with facility grandfather clock',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`skey_tk`,`skey_at`,`skey_ts`,`isTest`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='This table contains live spread quote records from the individual equity option exchanges. Each record contains up to two price levels and represents a live snapshot of the book for a specific spread.';

SELECT TABLE EXAMPLE QUERY

SELECT
`skey_at`,
`skey_ts`,
`skey_tk`,
`isTest`,
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`SRspreadID`,
`bidPrice1`,
`isBidPrice1Valid`,
`askPrice1`,
`isAskPrice1Valid`,
`bidSize1`,
`askSize1`,
`bidPrice2`,
`isBidPrice2Valid`,
`askPrice2`,
`isAskPrice2Valid`,
`bidSize2`,
`askSize2`,
`bidExch1`,
`askExch1`,
`bidMask1`,
`askMask1`,
`bidTime`,
`askTime`,
`printVolume`,
`updateType`,
`srcTimestamp`,
`netTimestamp`,
`timestamp`
FROM `SRSpread`.`MsgSpreadBookQuote`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`skey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`skey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`skey_tk` = 'Example_skey_tk'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTest` = 'None';

Doc Columns Query

SELECT * FROM SRSpread.doccolumns WHERE TABLE_NAME='SpreadBookQuote' ORDER BY ordinal_position ASC;